const mutations = {
    FETCH_TOKEN: (state,token)=>{
        state.token = token;
        window.localStorage.setItem('token',token);
    },
    GET_USERNAME:(state,username)=>{
        state.username = username;
        window.localStorage.setItem('username',username);
    },
    GET_USERPIC:(state,userpic)=>{
        state.userpic = userpic;
        window.localStorage.setItem('userpic',userpic);
    },
    GET_CITY:(state,data)=>{
        state.citylist = data;
    },
    GET_REGION:(state,data)=>{
        state.regionlist = data;
    },
    LOGIN_STATUS:(state,islogin)=>{
        state.islogin = islogin;
        window.localStorage.setItem('islogin',islogin);
    },
    USER_TYPE:(state,user_type)=>{
        state.user_type = user_type;
        window.localStorage.setItem('user_type',user_type);
    },
    GET_SHARE_SELECT:(state,sharesobj)=>{
        state.sharesObj = sharesobj;
    },
    RESET_SELECT:(state,sharesobj)=>{
        state.sharesObj = sharesobj;
    },
}

export default mutations